'use strict';

/**
 * @ngdoc function
 * @name webApp.controller:UserinformationCtrl
 * @description
 * # UserinformationCtrl
 * Controller of the webApp
 */

angular.module('webApp')
  .controller('userInformation', function ($scope,promiseUserInformation,cookie) {
  $scope.$on('$stateChangeSuccess',function(){
    if(cookie.getCookie('access_token')){
      promiseUserInformation.userInformations(1,10).then(function(data){
        $scope.userCommunicateData = data;
      });
    }
  });
});
